package singleton.demo1.strategy.learn;

import java.util.Comparator;

public class CatStrategyWidth implements Comparator<Animal> {
    @Override
    public int compare(Animal o1, Animal o2) {
        int result = 0;

        if(o1.width > o2.width){
            result = 1;
        }else if(o1.width < o2.width){
            result = -1;
        }

        return result;
    }
}
